

transactions = load 'shop' USING PigStorage('\t') as (customer:chararray, price:float);
describe transactions;
--dump transactions;

buying = group transactions by customer;
describe buying;
--dump buying;

customer_record = foreach buying generate group, SUM(transactions.price);
describe customer_record;
--dump customer_record;

